package algorithms;

import game.AbstractOthelloPosition;

public class OthelloEvaluatorCountPieces implements OthelloEvaluatorInterface {
	
	private boolean _player;
	
	public OthelloEvaluatorCountPieces(boolean player){
		_player = player;
	}
	
	@Override
	public int evaluate(AbstractOthelloPosition position) {
		char playerColor = (_player) ? 'W' : 'B';
		char opponentColor = (_player) ? 'B' : 'W'; 
		return position.getCount(playerColor) - position.getCount(opponentColor);
		
	}

}
